import request from '../request'

// 用户相关接口
const userApi = {
  // 用户登录
  login: (data) => request.post('/auth/login', data),
  
  // 用户登出
  logout: () => request.post('/auth/logout'),
  
  // 获取用户信息
  getUserInfo: () => request.get('/user/info'),
  
  // 获取用户列表
  getUserList: (params) => request.get('/user/list', { params }),
  
  // 创建用户
  createUser: (data) => request.post('/user/create', data),
  
  // 更新用户
  updateUser: (id, data) => request.put(`/user/update/${id}`, data),
  
  // 删除用户
  deleteUser: (id) => request.delete(`/user/delete/${id}`),
  
  // 批量删除用户
  batchDeleteUsers: (ids) => request.post('/user/batch-delete', { ids }),
  
  // 修改用户状态
  updateUserStatus: (id, status) => request.put(`/user/status/${id}`, { status })
}

export default userApi